<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.Dwarf</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-2"></span><span>  </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#dwarfGen"><span class="hs-identifier">dwarfGen</span></a></span><span>
</span><span id="line-3"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-8"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html"><span class="hs-identifier">GHC.Cmm.Expr</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier">GlobalReg</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Settings.Config.html"><span class="hs-identifier">GHC.Settings.Config</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Settings.Config.html#cProjectName"><span class="hs-identifier">cProjectName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Version.html#cProjectVersion"><span class="hs-identifier">cProjectVersion</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>            </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.html#Tickish"><span class="hs-identifier">Tickish</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html"><span class="hs-identifier">GHC.Cmm.DebugBlock</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Constants.html"><span class="hs-identifier">GHC.CmmToAsm.Dwarf.Constants</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html"><span class="hs-identifier">GHC.CmmToAsm.Dwarf.Types</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Arrow.html#"><span class="hs-identifier">Control.Arrow</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Control.Arrow.html#first"><span class="hs-identifier">first</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#mfilter"><span class="hs-identifier">mfilter</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier">sortBy</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#"><span class="hs-identifier">Data.Ord</span></a></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier">comparing</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#getCurrentDirectory"><span class="hs-identifier">getCurrentDirectory</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Label</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">H</span></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Collections</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">H</span></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- | Generate DWARF/debug information</span><span>
</span><span id="line-35"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#dwarfGen"><span class="hs-identifier hs-type">dwarfGen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-36"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span id="dwarfGen"><span class="annot"><span class="annottext">dwarfGen :: DynFlags
-&gt; ModLocation
-&gt; UniqSupply
-&gt; [DebugBlock]
-&gt; IO (SDoc, UniqSupply)
</span><a href="GHC.CmmToAsm.Dwarf.html#dwarfGen"><span class="hs-identifier hs-var hs-var">dwarfGen</span></a></span></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">ModLocation
</span><span class="hs-identifier">_</span></span><span>      </span><span id="local-6989586621681043481"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043481"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SDoc, UniqSupply) -&gt; IO (SDoc, UniqSupply)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043481"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#dwarfGen"><span class="hs-identifier hs-var">dwarfGen</span></a></span><span> </span><span id="local-6989586621681043479"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043479"><span class="hs-identifier hs-var">df</span></a></span></span><span> </span><span id="local-6989586621681043478"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681043478"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681043477"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043477"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621681043476"><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043476"><span class="hs-identifier hs-var">blocks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043475"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043479"><span class="hs-identifier hs-var">df</span></a></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>  </span><span class="hs-comment">-- Convert debug data structures to DWARF info records</span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-comment">-- We strip out block information when running with -g0 or -g1.</span><span>
</span><span id="line-43"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043473"><span class="annot"><span class="annottext">procs :: [DebugBlock]
</span><a href="#local-6989586621681043473"><span class="hs-identifier hs-var hs-var">procs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; [DebugBlock]
</span><a href="GHC.CmmToAsm.Dwarf.html#debugSplitProcs"><span class="hs-identifier hs-var">debugSplitProcs</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043476"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-44"></span><span>      </span><span id="local-6989586621681043468"><span class="annot"><span class="annottext">stripBlocks :: DebugBlock -&gt; DebugBlock
</span><a href="#local-6989586621681043468"><span class="hs-identifier hs-var hs-var">stripBlocks</span></a></span></span><span> </span><span id="local-6989586621681043467"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043467"><span class="hs-identifier hs-var">dbg</span></a></span></span><span>
</span><span id="line-45"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#debugLevel"><span class="hs-identifier hs-var hs-var">debugLevel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043479"><span class="hs-identifier hs-var">df</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043467"><span class="hs-identifier hs-var">dbg</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dblBlocks :: [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var">dblBlocks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-46"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043467"><span class="hs-identifier hs-var">dbg</span></a></span><span>
</span><span id="line-47"></span><span>  </span><span id="local-6989586621681043463"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681043463"><span class="hs-identifier hs-var">compPath</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO FilePath
</span><a href="../../directory/src/System.Directory.html#getCurrentDirectory"><span class="hs-identifier hs-var">getCurrentDirectory</span></a></span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043462"><span class="annot"><span class="annottext">lowLabel :: CLabel
</span><a href="#local-6989586621681043462"><span class="hs-identifier hs-var hs-var">lowLabel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; CLabel) -&gt; DebugBlock -&gt; CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; DebugBlock
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043473"><span class="hs-identifier hs-var">procs</span></a></span><span>
</span><span id="line-49"></span><span>      </span><span id="local-6989586621681043459"><span class="annot"><span class="annottext">highLabel :: CLabel
</span><a href="#local-6989586621681043459"><span class="hs-identifier hs-var hs-var">highLabel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempEndLabel"><span class="hs-identifier hs-var">mkAsmTempEndLabel</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; CLabel) -&gt; CLabel -&gt; CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; CLabel) -&gt; DebugBlock -&gt; CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; DebugBlock
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#last"><span class="hs-identifier hs-var">last</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043473"><span class="hs-identifier hs-var">procs</span></a></span><span>
</span><span id="line-50"></span><span>      </span><span id="local-6989586621681043456"><span class="annot"><span class="annottext">dwarfUnit :: DwarfInfo
</span><a href="#local-6989586621681043456"><span class="hs-identifier hs-var hs-var">dwarfUnit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DwarfCompileUnit :: [DwarfInfo]
-&gt; FilePath
-&gt; FilePath
-&gt; FilePath
-&gt; CLabel
-&gt; CLabel
-&gt; PtrString
-&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfCompileUnit"><span class="hs-identifier hs-type">DwarfCompileUnit</span></a></span><span>
</span><span id="line-51"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dwChildren :: [DwarfInfo]
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwChildren"><span class="hs-identifier hs-var">dwChildren</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DwarfInfo) -&gt; [DebugBlock] -&gt; [DwarfInfo]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; DebugBlock -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.html#procToDwarf"><span class="hs-identifier hs-var">procToDwarf</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043479"><span class="hs-identifier hs-var">df</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(DebugBlock -&gt; DebugBlock) -&gt; [DebugBlock] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; DebugBlock
</span><a href="#local-6989586621681043468"><span class="hs-identifier hs-var">stripBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043473"><span class="hs-identifier hs-var">procs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwName :: FilePath
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwName"><span class="hs-identifier hs-var">dwName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Maybe FilePath -&gt; FilePath
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModLocation -&gt; Maybe FilePath
</span><a href="GHC.Unit.Module.Location.html#ml_hs_file"><span class="hs-identifier hs-var hs-var">ml_hs_file</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681043478"><span class="hs-identifier hs-var">modLoc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwCompDir :: FilePath
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwCompDir"><span class="hs-identifier hs-var">dwCompDir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
</span><a href="../../filepath/src/System.FilePath.Windows.html#addTrailingPathSeparator"><span class="hs-identifier hs-var">addTrailingPathSeparator</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681043463"><span class="hs-identifier hs-var">compPath</span></a></span><span>
</span><span id="line-54"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwProducer :: FilePath
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwProducer"><span class="hs-identifier hs-var">dwProducer</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="GHC.Settings.Config.html#cProjectName"><span class="hs-identifier hs-var">cProjectName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="../../ghc-boot/src/GHC.Version.html#cProjectVersion"><span class="hs-identifier hs-var">cProjectVersion</span></a></span><span>
</span><span id="line-55"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwLowLabel :: CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwLowLabel"><span class="hs-identifier hs-var">dwLowLabel</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043462"><span class="hs-identifier hs-var">lowLabel</span></a></span><span>
</span><span id="line-56"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwHighLabel :: CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwHighLabel"><span class="hs-identifier hs-var">dwHighLabel</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043459"><span class="hs-identifier hs-var">highLabel</span></a></span><span>
</span><span id="line-57"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwLineLabel :: PtrString
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwLineLabel"><span class="hs-identifier hs-var">dwLineLabel</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfLineLabel"><span class="hs-identifier hs-var">dwarfLineLabel</span></a></span><span>
</span><span id="line-58"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span>  </span><span class="hs-comment">-- Check whether we have any source code information, so we do not</span><span>
</span><span id="line-61"></span><span>  </span><span class="hs-comment">-- end up writing a pointer to an empty .debug_line section</span><span>
</span><span id="line-62"></span><span>  </span><span class="hs-comment">-- (dsymutil on Mac Os gets confused by this).</span><span>
</span><span id="line-63"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043441"><span class="annot"><span class="annottext">haveSrcIn :: DebugBlock -&gt; Bool
</span><a href="#local-6989586621681043441"><span class="hs-identifier hs-var hs-var">haveSrcIn</span></a></span></span><span> </span><span id="local-6989586621681043440"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043440"><span class="hs-identifier hs-var">blk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CmmTickish -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe CmmTickish
</span><a href="GHC.Cmm.DebugBlock.html#dblSourceTick"><span class="hs-identifier hs-var hs-var">dblSourceTick</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043440"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var hs-var">dblPosition</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043440"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>                      </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; Bool) -&gt; [DebugBlock] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="#local-6989586621681043441"><span class="hs-identifier hs-var">haveSrcIn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043440"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>      </span><span id="local-6989586621681043432"><span class="annot"><span class="annottext">haveSrc :: Bool
</span><a href="#local-6989586621681043432"><span class="hs-identifier hs-var hs-var">haveSrc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; Bool) -&gt; [DebugBlock] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="#local-6989586621681043441"><span class="hs-identifier hs-var">haveSrcIn</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043473"><span class="hs-identifier hs-var">procs</span></a></span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span>  </span><span class="hs-comment">-- .debug_abbrev section: Declare the format we're using</span><span>
</span><span id="line-68"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043431"><span class="annot"><span class="annottext">abbrevSct :: SDoc
</span><a href="#local-6989586621681043431"><span class="hs-identifier hs-var hs-var">abbrevSct</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#pprAbbrevDecls"><span class="hs-identifier hs-var">pprAbbrevDecls</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681043432"><span class="hs-identifier hs-var">haveSrc</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span>  </span><span class="hs-comment">-- .debug_info section: Information records on procedures and blocks</span><span>
</span><span id="line-71"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-comment">-- unique to identify start and end compilation unit .debug_inf</span><span>
</span><span id="line-72"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621681043429"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043429"><span class="hs-identifier hs-var">unitU</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043428"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043428"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; (Unique, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#takeUniqFromSupply"><span class="hs-identifier hs-var">takeUniqFromSupply</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043477"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-73"></span><span>      </span><span id="local-6989586621681043426"><span class="annot"><span class="annottext">infoSct :: SDoc
</span><a href="#local-6989586621681043426"><span class="hs-identifier hs-var hs-var">infoSct</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfInfoLabel"><span class="hs-identifier hs-var">dwarfInfoLabel</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span>
</span><span id="line-74"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfInfoSection"><span class="hs-identifier hs-var">dwarfInfoSection</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-75"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Unique -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.html#compileUnitHeader"><span class="hs-identifier hs-var">compileUnitHeader</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043429"><span class="hs-identifier hs-var">unitU</span></a></span><span>
</span><span id="line-76"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; DwarfInfo -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#pprDwarfInfo"><span class="hs-identifier hs-var">pprDwarfInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681043432"><span class="hs-identifier hs-var">haveSrc</span></a></span><span> </span><span class="annot"><span class="annottext">DwarfInfo
</span><a href="#local-6989586621681043456"><span class="hs-identifier hs-var">dwarfUnit</span></a></span><span>
</span><span id="line-77"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.html#compileUnitFooter"><span class="hs-identifier hs-var">compileUnitFooter</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043429"><span class="hs-identifier hs-var">unitU</span></a></span><span>
</span><span id="line-78"></span><span>                     </span><span class="hs-special">]</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span>  </span><span class="hs-comment">-- .debug_line section: Generated mainly by the assembler, but we</span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-comment">-- need to label it</span><span>
</span><span id="line-82"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043416"><span class="annot"><span class="annottext">lineSct :: SDoc
</span><a href="#local-6989586621681043416"><span class="hs-identifier hs-var hs-var">lineSct</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfLineSection"><span class="hs-identifier hs-var">dwarfLineSection</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-83"></span><span>                </span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfLineLabel"><span class="hs-identifier hs-var">dwarfLineLabel</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span>  </span><span class="hs-comment">-- .debug_frame section: Information about the layout of the GHC stack</span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043413"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043413"><span class="hs-identifier hs-var">framesU</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043412"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043412"><span class="hs-identifier hs-var">us''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; (Unique, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#takeUniqFromSupply"><span class="hs-identifier hs-var">takeUniqFromSupply</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043428"><span class="hs-identifier hs-var">us'</span></a></span><span>
</span><span id="line-87"></span><span>      </span><span id="local-6989586621681043411"><span class="annot"><span class="annottext">frameSct :: SDoc
</span><a href="#local-6989586621681043411"><span class="hs-identifier hs-var hs-var">frameSct</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfFrameSection"><span class="hs-identifier hs-var">dwarfFrameSection</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-88"></span><span>                 </span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfFrameLabel"><span class="hs-identifier hs-var">dwarfFrameLabel</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-89"></span><span>                 </span><span class="annot"><span class="annottext">Platform -&gt; DwarfFrame -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#pprDwarfFrame"><span class="hs-identifier hs-var">pprDwarfFrame</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; [DebugBlock] -&gt; DwarfFrame
</span><a href="GHC.CmmToAsm.Dwarf.html#debugFrame"><span class="hs-identifier hs-var">debugFrame</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043413"><span class="hs-identifier hs-var">framesU</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043473"><span class="hs-identifier hs-var">procs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span>  </span><span class="hs-comment">-- .aranges section: Information about the bounds of compilation units</span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043406"><span class="annot"><span class="annottext">aranges' :: [DwarfARange]
</span><a href="#local-6989586621681043406"><span class="hs-identifier hs-var hs-var">aranges'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_SplitSections"><span class="hs-identifier hs-var">Opt_SplitSections</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043479"><span class="hs-identifier hs-var">df</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DwarfARange) -&gt; [DebugBlock] -&gt; [DwarfARange]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; DwarfARange
</span><a href="GHC.CmmToAsm.Dwarf.html#mkDwarfARange"><span class="hs-identifier hs-var">mkDwarfARange</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043473"><span class="hs-identifier hs-var">procs</span></a></span><span>
</span><span id="line-93"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CLabel -&gt; CLabel -&gt; DwarfARange
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfARange"><span class="hs-identifier hs-var">DwarfARange</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043462"><span class="hs-identifier hs-var">lowLabel</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043459"><span class="hs-identifier hs-var">highLabel</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-94"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043401"><span class="annot"><span class="annottext">aranges :: SDoc
</span><a href="#local-6989586621681043401"><span class="hs-identifier hs-var hs-var">aranges</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfARangesSection"><span class="hs-identifier hs-var">dwarfARangesSection</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [DwarfARange] -&gt; Unique -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#pprDwarfARanges"><span class="hs-identifier hs-var">pprDwarfARanges</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">[DwarfARange]
</span><a href="#local-6989586621681043406"><span class="hs-identifier hs-var">aranges'</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043429"><span class="hs-identifier hs-var">unitU</span></a></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span>  </span><span class="annot"><span class="annottext">(SDoc, UniqSupply) -&gt; IO (SDoc, UniqSupply)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681043426"><span class="hs-identifier hs-var">infoSct</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681043431"><span class="hs-identifier hs-var">abbrevSct</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681043416"><span class="hs-identifier hs-var">lineSct</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681043411"><span class="hs-identifier hs-var">frameSct</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681043401"><span class="hs-identifier hs-var">aranges</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043412"><span class="hs-identifier hs-var">us''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-- | Build an address range entry for one proc.</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- With split sections, each proc needs its own entry, since they may get</span><span>
</span><span id="line-100"></span><span class="hs-comment">-- scattered in the final binary. Without split sections, we could make a</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- single arange based on the first/last proc.</span><span>
</span><span id="line-102"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#mkDwarfARange"><span class="hs-identifier hs-type">mkDwarfARange</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfARange"><span class="hs-identifier hs-type">DwarfARange</span></a></span><span>
</span><span id="line-103"></span><span id="mkDwarfARange"><span class="annot"><span class="annottext">mkDwarfARange :: DebugBlock -&gt; DwarfARange
</span><a href="GHC.CmmToAsm.Dwarf.html#mkDwarfARange"><span class="hs-identifier hs-var hs-var">mkDwarfARange</span></a></span></span><span> </span><span id="local-6989586621681043398"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043398"><span class="hs-identifier hs-var">proc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel -&gt; DwarfARange
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfARange"><span class="hs-identifier hs-var">DwarfARange</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043397"><span class="hs-identifier hs-var">start</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043396"><span class="hs-identifier hs-var">end</span></a></span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-105"></span><span>    </span><span id="local-6989586621681043397"><span class="annot"><span class="annottext">start :: CLabel
</span><a href="#local-6989586621681043397"><span class="hs-identifier hs-var hs-var">start</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043398"><span class="hs-identifier hs-var">proc</span></a></span><span>
</span><span id="line-106"></span><span>    </span><span id="local-6989586621681043396"><span class="annot"><span class="annottext">end :: CLabel
</span><a href="#local-6989586621681043396"><span class="hs-identifier hs-var hs-var">end</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempEndLabel"><span class="hs-identifier hs-var">mkAsmTempEndLabel</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043397"><span class="hs-identifier hs-var">start</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | Header for a compilation unit, establishing global format</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- parameters</span><span>
</span><span id="line-110"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#compileUnitHeader"><span class="hs-identifier hs-type">compileUnitHeader</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-111"></span><span id="compileUnitHeader"><span class="annot"><span class="annottext">compileUnitHeader :: Platform -&gt; Unique -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.html#compileUnitHeader"><span class="hs-identifier hs-var hs-var">compileUnitHeader</span></a></span></span><span> </span><span id="local-6989586621681043395"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043395"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681043394"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043394"><span class="hs-identifier hs-var">unitU</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043392"><span class="annot"><span class="annottext">cuLabel :: CLabel
</span><a href="#local-6989586621681043392"><span class="hs-identifier hs-var hs-var">cuLabel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; CLabel
forall a. Uniquable a =&gt; a -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempLabel"><span class="hs-identifier hs-var">mkAsmTempLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043394"><span class="hs-identifier hs-var">unitU</span></a></span><span>  </span><span class="hs-comment">-- sits right before initialLength field</span><span>
</span><span id="line-113"></span><span>      </span><span id="local-6989586621681043388"><span class="annot"><span class="annottext">length :: SDoc
</span><a href="#local-6989586621681043388"><span class="hs-identifier hs-var hs-var">length</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempEndLabel"><span class="hs-identifier hs-var">mkAsmTempEndLabel</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043392"><span class="hs-identifier hs-var">cuLabel</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043392"><span class="hs-identifier hs-var">cuLabel</span></a></span><span>
</span><span id="line-114"></span><span>               </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-4&quot;</span></span><span>       </span><span class="hs-comment">-- length of initialLength field</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043392"><span class="hs-identifier hs-var">cuLabel</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span>
</span><span id="line-116"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;\t.long &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681043388"><span class="hs-identifier hs-var">length</span></a></span><span>  </span><span class="hs-comment">-- compilation unit size</span><span>
</span><span id="line-117"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#pprHalf"><span class="hs-identifier hs-var">pprHalf</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><span class="hs-number">3</span></span><span>                          </span><span class="hs-comment">-- DWARF version</span><span>
</span><span id="line-118"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#sectionOffset"><span class="hs-identifier hs-var">sectionOffset</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043395"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfAbbrevLabel"><span class="hs-identifier hs-var">dwarfAbbrevLabel</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="GHC.CmmToAsm.Dwarf.Constants.html#dwarfAbbrevLabel"><span class="hs-identifier hs-var">dwarfAbbrevLabel</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>                                               </span><span class="hs-comment">-- abbrevs offset</span><span>
</span><span id="line-120"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;\t.byte &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043395"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- word size</span><span>
</span><span id="line-121"></span><span>          </span><span class="hs-special">]</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- | Compilation unit footer, mainly establishing size of debug sections</span><span>
</span><span id="line-124"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#compileUnitFooter"><span class="hs-identifier hs-type">compileUnitFooter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-125"></span><span id="compileUnitFooter"><span class="annot"><span class="annottext">compileUnitFooter :: Unique -&gt; SDoc
</span><a href="GHC.CmmToAsm.Dwarf.html#compileUnitFooter"><span class="hs-identifier hs-var hs-var">compileUnitFooter</span></a></span></span><span> </span><span id="local-6989586621681043380"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043380"><span class="hs-identifier hs-var">unitU</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-126"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043378"><span class="annot"><span class="annottext">cuEndLabel :: CLabel
</span><a href="#local-6989586621681043378"><span class="hs-identifier hs-var hs-var">cuEndLabel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempEndLabel"><span class="hs-identifier hs-var">mkAsmTempEndLabel</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; CLabel) -&gt; CLabel -&gt; CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; CLabel
forall a. Uniquable a =&gt; a -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempLabel"><span class="hs-identifier hs-var">mkAsmTempLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043380"><span class="hs-identifier hs-var">unitU</span></a></span><span>
</span><span id="line-127"></span><span>  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043378"><span class="hs-identifier hs-var">cuEndLabel</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="hs-comment">-- | Splits the blocks by procedures. In the result all nested blocks</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- will come from the same procedure as the top-level block. See</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- Note [Splitting DebugBlocks] for details.</span><span>
</span><span id="line-132"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#debugSplitProcs"><span class="hs-identifier hs-type">debugSplitProcs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-133"></span><span id="debugSplitProcs"><span class="annot"><span class="annottext">debugSplitProcs :: [DebugBlock] -&gt; [DebugBlock]
</span><a href="GHC.CmmToAsm.Dwarf.html#debugSplitProcs"><span class="hs-identifier hs-var hs-var">debugSplitProcs</span></a></span></span><span> </span><span id="local-6989586621681043377"><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043377"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[DebugBlock]] -&gt; [DebugBlock]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">([[DebugBlock]] -&gt; [DebugBlock]) -&gt; [[DebugBlock]] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [DebugBlock] -&gt; [[DebugBlock]]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; [a]
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapElems"><span class="hs-identifier hs-var">H.mapElems</span></a></span><span> </span><span class="annot"><span class="annottext">(LabelMap [DebugBlock] -&gt; [[DebugBlock]])
-&gt; LabelMap [DebugBlock] -&gt; [[DebugBlock]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[LabelMap [DebugBlock]] -&gt; LabelMap [DebugBlock]
forall {a}. [LabelMap [a]] -&gt; LabelMap [a]
</span><a href="#local-6989586621681043374"><span class="hs-identifier hs-var">mergeMaps</span></a></span><span> </span><span class="annot"><span class="annottext">([LabelMap [DebugBlock]] -&gt; LabelMap [DebugBlock])
-&gt; [LabelMap [DebugBlock]] -&gt; LabelMap [DebugBlock]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; LabelMap [DebugBlock])
-&gt; [DebugBlock] -&gt; [LabelMap [DebugBlock]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe DebugBlock -&gt; DebugBlock -&gt; LabelMap [DebugBlock]
</span><a href="#local-6989586621681043373"><span class="hs-identifier hs-var">split</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe DebugBlock
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043377"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-134"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681043374"><span class="annot"><span class="annottext">mergeMaps :: [LabelMap [a]] -&gt; LabelMap [a]
</span><a href="#local-6989586621681043374"><span class="hs-identifier hs-var hs-var">mergeMaps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LabelMap [a] -&gt; LabelMap [a] -&gt; LabelMap [a])
-&gt; LabelMap [a] -&gt; [LabelMap [a]] -&gt; LabelMap [a]
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(KeyOf LabelMap -&gt; [a] -&gt; [a] -&gt; [a])
-&gt; LabelMap [a] -&gt; LabelMap [a] -&gt; LabelMap [a]
forall (map :: * -&gt; *) a.
IsMap map =&gt;
(KeyOf map -&gt; a -&gt; a -&gt; a) -&gt; map a -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapUnionWithKey"><span class="hs-identifier hs-var">H.mapUnionWithKey</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([a] -&gt; [a] -&gt; [a]) -&gt; KeyOf LabelMap -&gt; [a] -&gt; [a] -&gt; [a]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">(++)</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelMap [a]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">H.mapEmpty</span></a></span><span>
</span><span id="line-135"></span><span>        </span><span class="annot"><a href="#local-6989586621681043373"><span class="hs-identifier hs-type">split</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">H.LabelMap</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-136"></span><span>        </span><span id="local-6989586621681043373"><span class="annot"><span class="annottext">split :: Maybe DebugBlock -&gt; DebugBlock -&gt; LabelMap [DebugBlock]
</span><a href="#local-6989586621681043373"><span class="hs-identifier hs-var hs-var">split</span></a></span></span><span> </span><span id="local-6989586621681043365"><span class="annot"><span class="annottext">Maybe DebugBlock
</span><a href="#local-6989586621681043365"><span class="hs-identifier hs-var">parent</span></a></span></span><span> </span><span id="local-6989586621681043364"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043364"><span class="hs-identifier hs-var">blk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
-&gt; [DebugBlock] -&gt; LabelMap [DebugBlock] -&gt; LabelMap [DebugBlock]
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; a -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapInsert"><span class="hs-identifier hs-var">H.mapInsert</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
Label
</span><a href="#local-6989586621681043362"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043361"><span class="hs-identifier hs-var">blk'</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">LabelMap [DebugBlock]
</span><a href="#local-6989586621681043360"><span class="hs-identifier hs-var">nested</span></a></span><span>
</span><span id="line-137"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681043362"><span class="annot"><span class="annottext">prc :: Label
</span><a href="#local-6989586621681043362"><span class="hs-identifier hs-var hs-var">prc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblProcedure"><span class="hs-identifier hs-var hs-var">dblProcedure</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043364"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-138"></span><span>                </span><span id="local-6989586621681043361"><span class="annot"><span class="annottext">blk' :: DebugBlock
</span><a href="#local-6989586621681043361"><span class="hs-identifier hs-var hs-var">blk'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043364"><span class="hs-identifier hs-var">blk</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dblBlocks :: [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var">dblBlocks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043358"><span class="hs-identifier hs-var">own_blks</span></a></span><span>
</span><span id="line-139"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblParent :: Maybe DebugBlock
</span><a href="GHC.Cmm.DebugBlock.html#dblParent"><span class="hs-identifier hs-var">dblParent</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe DebugBlock
</span><a href="#local-6989586621681043365"><span class="hs-identifier hs-var">parent</span></a></span><span>
</span><span id="line-140"></span><span>                           </span><span class="hs-special">}</span><span>
</span><span id="line-141"></span><span>                </span><span id="local-6989586621681043358"><span class="annot"><span class="annottext">own_blks :: [DebugBlock]
</span><a href="#local-6989586621681043358"><span class="hs-identifier hs-var hs-var">own_blks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; Maybe [DebugBlock] -&gt; [DebugBlock]
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(Maybe [DebugBlock] -&gt; [DebugBlock])
-&gt; Maybe [DebugBlock] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap [DebugBlock] -&gt; Maybe [DebugBlock]
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">H.mapLookup</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
Label
</span><a href="#local-6989586621681043362"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [DebugBlock]
</span><a href="#local-6989586621681043360"><span class="hs-identifier hs-var">nested</span></a></span><span>
</span><span id="line-142"></span><span>                </span><span id="local-6989586621681043360"><span class="annot"><span class="annottext">nested :: LabelMap [DebugBlock]
</span><a href="#local-6989586621681043360"><span class="hs-identifier hs-var hs-var">nested</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LabelMap [DebugBlock]] -&gt; LabelMap [DebugBlock]
forall {a}. [LabelMap [a]] -&gt; LabelMap [a]
</span><a href="#local-6989586621681043374"><span class="hs-identifier hs-var">mergeMaps</span></a></span><span> </span><span class="annot"><span class="annottext">([LabelMap [DebugBlock]] -&gt; LabelMap [DebugBlock])
-&gt; [LabelMap [DebugBlock]] -&gt; LabelMap [DebugBlock]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; LabelMap [DebugBlock])
-&gt; [DebugBlock] -&gt; [LabelMap [DebugBlock]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe DebugBlock -&gt; DebugBlock -&gt; LabelMap [DebugBlock]
</span><a href="#local-6989586621681043373"><span class="hs-identifier hs-var">split</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe DebugBlock
</span><a href="#local-6989586621681043354"><span class="hs-identifier hs-var">parent'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([DebugBlock] -&gt; [LabelMap [DebugBlock]])
-&gt; [DebugBlock] -&gt; [LabelMap [DebugBlock]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043364"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-143"></span><span>                </span><span class="hs-comment">-- Figure out who should be the parent of nested blocks.</span><span>
</span><span id="line-144"></span><span>                </span><span class="hs-comment">-- If @blk@ is optimized out then it isn't a good choice</span><span>
</span><span id="line-145"></span><span>                </span><span class="hs-comment">-- and we just use its parent.</span><span>
</span><span id="line-146"></span><span>                </span><span id="local-6989586621681043354"><span class="annot"><span class="annottext">parent' :: Maybe DebugBlock
</span><a href="#local-6989586621681043354"><span class="hs-identifier hs-var hs-var">parent'</span></a></span></span><span>
</span><span id="line-147"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var hs-var">dblPosition</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043364"><span class="hs-identifier hs-var">blk</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe DebugBlock
</span><a href="#local-6989586621681043365"><span class="hs-identifier hs-var">parent</span></a></span><span>
</span><span id="line-148"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe DebugBlock
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043364"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="hs-comment">{-
Note [Splitting DebugBlocks]

DWARF requires that we break up the nested DebugBlocks produced from
the C-- AST. For instance, we begin with tick trees containing nested procs.
For example,

    proc A [tick1, tick2]
      block B [tick3]
        proc C [tick4]

when producing DWARF we need to procs (which are represented in DWARF as
TAG_subprogram DIEs) to be top-level DIEs. debugSplitProcs is responsible for
this transform, pulling out the nested procs into top-level procs.

However, in doing this we need to be careful to preserve the parentage of the
nested procs. This is the reason DebugBlocks carry the dblParent field, allowing
us to reorganize the above tree as,

    proc A [tick1, tick2]
      block B [tick3]
    proc C [tick4] parent=B

Here we have annotated the new proc C with an attribute giving its original
parent, B.
-}</span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-comment">-- | Generate DWARF info for a procedure debug block</span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#procToDwarf"><span class="hs-identifier hs-type">procToDwarf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfInfo"><span class="hs-identifier hs-type">DwarfInfo</span></a></span><span>
</span><span id="line-179"></span><span id="procToDwarf"><span class="annot"><span class="annottext">procToDwarf :: DynFlags -&gt; DebugBlock -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.html#procToDwarf"><span class="hs-identifier hs-var hs-var">procToDwarf</span></a></span></span><span> </span><span id="local-6989586621681043353"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043353"><span class="hs-identifier hs-var">df</span></a></span></span><span> </span><span id="local-6989586621681043352"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043352"><span class="hs-identifier hs-var">prc</span></a></span></span><span>
</span><span id="line-180"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DwarfSubprogram :: [DwarfInfo] -&gt; FilePath -&gt; CLabel -&gt; Maybe CLabel -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfSubprogram"><span class="hs-identifier hs-type">DwarfSubprogram</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dwChildren :: [DwarfInfo]
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwChildren"><span class="hs-identifier hs-var">dwChildren</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DwarfInfo) -&gt; [DebugBlock] -&gt; [DwarfInfo]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.html#blockToDwarf"><span class="hs-identifier hs-var">blockToDwarf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043352"><span class="hs-identifier hs-var">prc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwName :: FilePath
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwName"><span class="hs-identifier hs-var">dwName</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe CmmTickish
</span><a href="GHC.Cmm.DebugBlock.html#dblSourceTick"><span class="hs-identifier hs-var hs-var">dblSourceTick</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043352"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-182"></span><span>                         </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681043349"><span class="annot"><span class="annottext">s :: CmmTickish
</span><a href="#local-6989586621681043349"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Core.html#SourceNote"><span class="hs-identifier hs-type">SourceNote</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmTickish -&gt; FilePath
forall id. Tickish id -&gt; FilePath
</span><a href="GHC.Core.html#sourceName"><span class="hs-identifier hs-var hs-var">sourceName</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickish
</span><a href="#local-6989586621681043349"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-183"></span><span>                         </span><span id="local-6989586621681043346"><span class="annot"><span class="annottext">Maybe CmmTickish
</span><a href="#local-6989586621681043346"><span class="hs-identifier hs-var">_otherwise</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; SDoc -&gt; FilePath
</span><a href="GHC.Utils.Outputable.html#showSDocDump"><span class="hs-identifier hs-var">showSDocDump</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043353"><span class="hs-identifier hs-var">df</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; FilePath) -&gt; SDoc -&gt; FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(Label -&gt; SDoc) -&gt; Label -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043352"><span class="hs-identifier hs-var">prc</span></a></span><span>
</span><span id="line-184"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwLabel :: CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwLabel"><span class="hs-identifier hs-var">dwLabel</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043352"><span class="hs-identifier hs-var">prc</span></a></span><span>
</span><span id="line-185"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwParent :: Maybe CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwParent"><span class="hs-identifier hs-var">dwParent</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; CLabel) -&gt; Maybe CLabel -&gt; Maybe CLabel
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempDieLabel"><span class="hs-identifier hs-var">mkAsmTempDieLabel</span></a></span><span>
</span><span id="line-186"></span><span>                                   </span><span class="annot"><span class="annottext">(Maybe CLabel -&gt; Maybe CLabel) -&gt; Maybe CLabel -&gt; Maybe CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; Bool) -&gt; Maybe CLabel -&gt; Maybe CLabel
forall (m :: * -&gt; *) a. MonadPlus m =&gt; (a -&gt; Bool) -&gt; m a -&gt; m a
</span><a href="../../base/src/Control.Monad.html#mfilter"><span class="hs-identifier hs-var">mfilter</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Bool
</span><a href="#local-6989586621681043340"><span class="hs-identifier hs-var">goodParent</span></a></span><span>
</span><span id="line-187"></span><span>                                   </span><span class="annot"><span class="annottext">(Maybe CLabel -&gt; Maybe CLabel) -&gt; Maybe CLabel -&gt; Maybe CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; CLabel) -&gt; Maybe DebugBlock -&gt; Maybe CLabel
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe DebugBlock
</span><a href="GHC.Cmm.DebugBlock.html#dblParent"><span class="hs-identifier hs-var hs-var">dblParent</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043352"><span class="hs-identifier hs-var">prc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-190"></span><span>  </span><span id="local-6989586621681043340"><span class="annot"><span class="annottext">goodParent :: CLabel -&gt; Bool
</span><a href="#local-6989586621681043340"><span class="hs-identifier hs-var hs-var">goodParent</span></a></span></span><span> </span><span id="local-6989586621681043335"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043335"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043352"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-191"></span><span>               </span><span class="hs-comment">-- Omit parent if it would be self-referential</span><span>
</span><span id="line-192"></span><span>  </span><span class="annot"><a href="#local-6989586621681043340"><span class="hs-identifier hs-var">goodParent</span></a></span><span> </span><span id="local-6989586621681043334"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043334"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Bool
</span><a href="GHC.Cmm.CLabel.html#externallyVisibleCLabel"><span class="hs-identifier hs-var">externallyVisibleCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043334"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#debugLevel"><span class="hs-identifier hs-var hs-var">debugLevel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043353"><span class="hs-identifier hs-var">df</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-194"></span><span>               </span><span class="hs-comment">-- We strip block information when running -g0 or -g1, don't</span><span>
</span><span id="line-195"></span><span>               </span><span class="hs-comment">-- refer to blocks in that case. Fixes #14894.</span><span>
</span><span id="line-196"></span><span>  </span><span class="annot"><a href="#local-6989586621681043340"><span class="hs-identifier hs-var">goodParent</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="hs-comment">-- | Generate DWARF info for a block</span><span>
</span><span id="line-199"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#blockToDwarf"><span class="hs-identifier hs-type">blockToDwarf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfInfo"><span class="hs-identifier hs-type">DwarfInfo</span></a></span><span>
</span><span id="line-200"></span><span id="blockToDwarf"><span class="annot"><span class="annottext">blockToDwarf :: DebugBlock -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.html#blockToDwarf"><span class="hs-identifier hs-var hs-var">blockToDwarf</span></a></span></span><span> </span><span id="local-6989586621681043331"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043331"><span class="hs-identifier hs-var">blk</span></a></span></span><span>
</span><span id="line-201"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DwarfBlock :: [DwarfInfo] -&gt; CLabel -&gt; Maybe CLabel -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfBlock"><span class="hs-identifier hs-type">DwarfBlock</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dwChildren :: [DwarfInfo]
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwChildren"><span class="hs-identifier hs-var">dwChildren</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmTickish -&gt; [DwarfInfo]) -&gt; [CmmTickish] -&gt; [DwarfInfo]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickish -&gt; [DwarfInfo]
</span><a href="GHC.CmmToAsm.Dwarf.html#tickToDwarf"><span class="hs-identifier hs-var">tickToDwarf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [CmmTickish]
</span><a href="GHC.Cmm.DebugBlock.html#dblTicks"><span class="hs-identifier hs-var hs-var">dblTicks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043331"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-202"></span><span>                              </span><span class="annot"><span class="annottext">[DwarfInfo] -&gt; [DwarfInfo] -&gt; [DwarfInfo]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DwarfInfo) -&gt; [DebugBlock] -&gt; [DwarfInfo]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.html#blockToDwarf"><span class="hs-identifier hs-var">blockToDwarf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043331"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwLabel :: CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwLabel"><span class="hs-identifier hs-var">dwLabel</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043331"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-204"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwMarker :: Maybe CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwMarker"><span class="hs-identifier hs-var">dwMarker</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CLabel
</span><a href="#local-6989586621681043325"><span class="hs-identifier hs-var">marker</span></a></span><span>
</span><span id="line-205"></span><span>               </span><span class="hs-special">}</span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-207"></span><span>    </span><span id="local-6989586621681043325"><span class="annot"><span class="annottext">marker :: Maybe CLabel
</span><a href="#local-6989586621681043325"><span class="hs-identifier hs-var hs-var">marker</span></a></span></span><span>
</span><span id="line-208"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var hs-var">dblPosition</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043331"><span class="hs-identifier hs-var">blk</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Maybe CLabel
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; Maybe CLabel) -&gt; CLabel -&gt; Maybe CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; CLabel
forall a. Uniquable a =&gt; a -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempLabel"><span class="hs-identifier hs-var">mkAsmTempLabel</span></a></span><span> </span><span class="annot"><span class="annottext">(Label -&gt; CLabel) -&gt; Label -&gt; CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043331"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-209"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CLabel
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-comment">-- block was optimized out</span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#tickToDwarf"><span class="hs-identifier hs-type">tickToDwarf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#Tickish"><span class="hs-identifier hs-type">Tickish</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfInfo"><span class="hs-identifier hs-type">DwarfInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-212"></span><span id="tickToDwarf"><span class="annot"><span class="annottext">tickToDwarf :: CmmTickish -&gt; [DwarfInfo]
</span><a href="GHC.CmmToAsm.Dwarf.html#tickToDwarf"><span class="hs-identifier hs-var hs-var">tickToDwarf</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#SourceNote"><span class="hs-identifier hs-type">SourceNote</span></a></span><span> </span><span id="local-6989586621681043322"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621681043322"><span class="hs-identifier hs-var">ss</span></a></span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">RealSrcSpan -&gt; DwarfInfo
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfSrcNote"><span class="hs-identifier hs-var">DwarfSrcNote</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621681043322"><span class="hs-identifier hs-var">ss</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-213"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#tickToDwarf"><span class="hs-identifier hs-var">tickToDwarf</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickish
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span class="hs-comment">-- | Generates the data for the debug frame section, which encodes the</span><span>
</span><span id="line-216"></span><span class="hs-comment">-- desired stack unwind behaviour for the debugger</span><span>
</span><span id="line-217"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#debugFrame"><span class="hs-identifier hs-type">debugFrame</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfFrame"><span class="hs-identifier hs-type">DwarfFrame</span></a></span><span>
</span><span id="line-218"></span><span id="debugFrame"><span class="annot"><span class="annottext">debugFrame :: Unique -&gt; [DebugBlock] -&gt; DwarfFrame
</span><a href="GHC.CmmToAsm.Dwarf.html#debugFrame"><span class="hs-identifier hs-var hs-var">debugFrame</span></a></span></span><span> </span><span id="local-6989586621681043320"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043320"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621681043319"><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043319"><span class="hs-identifier hs-var">procs</span></a></span></span><span>
</span><span id="line-219"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DwarfFrame :: CLabel -&gt; UnwindTable -&gt; [DwarfFrameProc] -&gt; DwarfFrame
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfFrame"><span class="hs-identifier hs-type">DwarfFrame</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dwCieLabel :: CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwCieLabel"><span class="hs-identifier hs-var">dwCieLabel</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; CLabel
forall a. Uniquable a =&gt; a -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkAsmTempLabel"><span class="hs-identifier hs-var">mkAsmTempLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681043320"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-220"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwCieInit :: UnwindTable
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwCieInit"><span class="hs-identifier hs-var">dwCieInit</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043315"><span class="hs-identifier hs-var">initUws</span></a></span><span>
</span><span id="line-221"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwCieProcs :: [DwarfFrameProc]
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwCieProcs"><span class="hs-identifier hs-var">dwCieProcs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DwarfFrameProc) -&gt; [DebugBlock] -&gt; [DwarfFrameProc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnwindTable -&gt; DebugBlock -&gt; DwarfFrameProc
</span><a href="GHC.CmmToAsm.Dwarf.html#procToFrame"><span class="hs-identifier hs-var">procToFrame</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043315"><span class="hs-identifier hs-var">initUws</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043319"><span class="hs-identifier hs-var">procs</span></a></span><span>
</span><span id="line-222"></span><span>               </span><span class="hs-special">}</span><span>
</span><span id="line-223"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-224"></span><span>    </span><span class="annot"><a href="#local-6989586621681043315"><span class="hs-identifier hs-type">initUws</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindTable"><span class="hs-identifier hs-type">UnwindTable</span></a></span><span>
</span><span id="line-225"></span><span>    </span><span id="local-6989586621681043315"><span class="annot"><span class="annottext">initUws :: UnwindTable
</span><a href="#local-6989586621681043315"><span class="hs-identifier hs-var hs-var">initUws</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(GlobalReg, Maybe UnwindExpr)] -&gt; UnwindTable
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">GlobalReg
</span><a href="GHC.Cmm.Expr.html#Sp"><span class="hs-identifier hs-var">Sp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UnwindExpr -&gt; Maybe UnwindExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GlobalReg -&gt; Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="GHC.Cmm.Expr.html#Sp"><span class="hs-identifier hs-var">Sp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span class="hs-comment">-- | Generates unwind information for a procedure debug block</span><span>
</span><span id="line-228"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#procToFrame"><span class="hs-identifier hs-type">procToFrame</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindTable"><span class="hs-identifier hs-type">UnwindTable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfFrameProc"><span class="hs-identifier hs-type">DwarfFrameProc</span></a></span><span>
</span><span id="line-229"></span><span id="procToFrame"><span class="annot"><span class="annottext">procToFrame :: UnwindTable -&gt; DebugBlock -&gt; DwarfFrameProc
</span><a href="GHC.CmmToAsm.Dwarf.html#procToFrame"><span class="hs-identifier hs-var hs-var">procToFrame</span></a></span></span><span> </span><span id="local-6989586621681043309"><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043309"><span class="hs-identifier hs-var">initUws</span></a></span></span><span> </span><span id="local-6989586621681043308"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043308"><span class="hs-identifier hs-var">blk</span></a></span></span><span>
</span><span id="line-230"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DwarfFrameProc :: CLabel -&gt; Bool -&gt; [DwarfFrameBlock] -&gt; DwarfFrameProc
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfFrameProc"><span class="hs-identifier hs-type">DwarfFrameProc</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dwFdeProc :: CLabel
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwFdeProc"><span class="hs-identifier hs-var">dwFdeProc</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043308"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-231"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwFdeHasInfo :: Bool
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwFdeHasInfo"><span class="hs-identifier hs-var">dwFdeHasInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var hs-var">dblHasInfoTbl</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043308"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-232"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwFdeBlocks :: [DwarfFrameBlock]
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwFdeBlocks"><span class="hs-identifier hs-var">dwFdeBlocks</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((DebugBlock, [UnwindPoint]) -&gt; DwarfFrameBlock)
-&gt; [(DebugBlock, [UnwindPoint])] -&gt; [DwarfFrameBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(DebugBlock -&gt; [UnwindPoint] -&gt; DwarfFrameBlock)
-&gt; (DebugBlock, [UnwindPoint]) -&gt; DwarfFrameBlock
forall a b c. (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
</span><a href="../../base/src/Data.Tuple.html#uncurry"><span class="hs-identifier hs-var">uncurry</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; [UnwindPoint] -&gt; DwarfFrameBlock
</span><a href="GHC.CmmToAsm.Dwarf.html#blockToFrame"><span class="hs-identifier hs-var">blockToFrame</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-233"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(DebugBlock, [UnwindPoint])] -&gt; [(DebugBlock, [UnwindPoint])]
</span><a href="#local-6989586621681043300"><span class="hs-identifier hs-var">setHasInfo</span></a></span><span> </span><span class="annot"><span class="annottext">[(DebugBlock, [UnwindPoint])]
</span><a href="#local-6989586621681043299"><span class="hs-identifier hs-var">blockUws</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-234"></span><span>                   </span><span class="hs-special">}</span><span>
</span><span id="line-235"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621681043299"><span class="hs-identifier hs-type">blockUws</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-236"></span><span>        </span><span id="local-6989586621681043299"><span class="annot"><span class="annottext">blockUws :: [(DebugBlock, [UnwindPoint])]
</span><a href="#local-6989586621681043299"><span class="hs-identifier hs-var hs-var">blockUws</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Int, (DebugBlock, [UnwindPoint])) -&gt; (DebugBlock, [UnwindPoint]))
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
-&gt; [(DebugBlock, [UnwindPoint])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, (DebugBlock, [UnwindPoint])) -&gt; (DebugBlock, [UnwindPoint])
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">([(Int, (DebugBlock, [UnwindPoint]))]
 -&gt; [(DebugBlock, [UnwindPoint])])
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
-&gt; [(DebugBlock, [UnwindPoint])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((Int, (DebugBlock, [UnwindPoint]))
 -&gt; (Int, (DebugBlock, [UnwindPoint])) -&gt; Ordering)
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Int, (DebugBlock, [UnwindPoint])) -&gt; Int)
-&gt; (Int, (DebugBlock, [UnwindPoint]))
-&gt; (Int, (DebugBlock, [UnwindPoint]))
-&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, (DebugBlock, [UnwindPoint])) -&gt; Int
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([(Int, (DebugBlock, [UnwindPoint]))]
 -&gt; [(Int, (DebugBlock, [UnwindPoint]))])
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; [(Int, (DebugBlock, [UnwindPoint]))]
</span><a href="#local-6989586621681043298"><span class="hs-identifier hs-var">flatten</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043308"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span>        </span><span class="annot"><a href="#local-6989586621681043298"><span class="hs-identifier hs-type">flatten</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span>
</span><span id="line-239"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-240"></span><span>        </span><span id="local-6989586621681043298"><span class="annot"><span class="annottext">flatten :: DebugBlock -&gt; [(Int, (DebugBlock, [UnwindPoint]))]
</span><a href="#local-6989586621681043298"><span class="hs-identifier hs-var hs-var">flatten</span></a></span></span><span> </span><span id="local-6989586621681043297"><span class="annot"><span class="annottext">b :: DebugBlock
</span><a href="#local-6989586621681043297"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dblPosition :: DebugBlock -&gt; Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var">dblPosition</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681043295"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621681043295"><span class="hs-identifier hs-var">pos</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblUnwind :: DebugBlock -&gt; [UnwindPoint]
</span><a href="GHC.Cmm.DebugBlock.html#dblUnwind"><span class="hs-identifier hs-var">dblUnwind</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681043293"><span class="annot"><span class="annottext">[UnwindPoint]
</span><a href="#local-6989586621681043293"><span class="hs-identifier hs-var">uws</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblBlocks :: DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var">dblBlocks</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681043292"><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043292"><span class="hs-identifier hs-var">blocks</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-241"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681043291"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681043291"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621681043295"><span class="hs-identifier hs-var">pos</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681043291"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043297"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[UnwindPoint]
</span><a href="#local-6989586621681043290"><span class="hs-identifier hs-var">uws'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="annot"><span class="annottext">(Int, (DebugBlock, [UnwindPoint]))
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
-&gt; [(Int, (DebugBlock, [UnwindPoint]))]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[(Int, (DebugBlock, [UnwindPoint]))]
</span><a href="#local-6989586621681043289"><span class="hs-identifier hs-var">nested</span></a></span><span>
</span><span id="line-242"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Int, (DebugBlock, [UnwindPoint]))]
</span><a href="#local-6989586621681043289"><span class="hs-identifier hs-var">nested</span></a></span><span> </span><span class="hs-comment">-- block was optimized out</span><span>
</span><span id="line-243"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681043290"><span class="annot"><span class="annottext">uws' :: [UnwindPoint]
</span><a href="#local-6989586621681043290"><span class="hs-identifier hs-var hs-var">uws'</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnwindTable -&gt; [UnwindPoint] -&gt; [UnwindPoint]
</span><a href="GHC.CmmToAsm.Dwarf.html#addDefaultUnwindings"><span class="hs-identifier hs-var">addDefaultUnwindings</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043309"><span class="hs-identifier hs-var">initUws</span></a></span><span> </span><span class="annot"><span class="annottext">[UnwindPoint]
</span><a href="#local-6989586621681043293"><span class="hs-identifier hs-var">uws</span></a></span><span>
</span><span id="line-244"></span><span>                </span><span id="local-6989586621681043289"><span class="annot"><span class="annottext">nested :: [(Int, (DebugBlock, [UnwindPoint]))]
</span><a href="#local-6989586621681043289"><span class="hs-identifier hs-var hs-var">nested</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; [(Int, (DebugBlock, [UnwindPoint]))])
-&gt; [DebugBlock] -&gt; [(Int, (DebugBlock, [UnwindPoint]))]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; [(Int, (DebugBlock, [UnwindPoint]))]
</span><a href="#local-6989586621681043298"><span class="hs-identifier hs-var">flatten</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681043292"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span>        </span><span class="hs-comment">-- | If the current procedure has an info table, then we also say that</span><span>
</span><span id="line-247"></span><span>        </span><span class="hs-comment">-- its first block has one to ensure that it gets the necessary -1</span><span>
</span><span id="line-248"></span><span>        </span><span class="hs-comment">-- offset applied to its start address.</span><span>
</span><span id="line-249"></span><span>        </span><span class="hs-comment">-- See Note [Info Offset] in &quot;GHC.CmmToAsm.Dwarf.Types&quot;.</span><span>
</span><span id="line-250"></span><span>        </span><span class="annot"><a href="#local-6989586621681043300"><span class="hs-identifier hs-type">setHasInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-251"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-252"></span><span>        </span><span id="local-6989586621681043300"><span class="annot"><span class="annottext">setHasInfo :: [(DebugBlock, [UnwindPoint])] -&gt; [(DebugBlock, [UnwindPoint])]
</span><a href="#local-6989586621681043300"><span class="hs-identifier hs-var hs-var">setHasInfo</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-253"></span><span>        </span><span class="annot"><a href="#local-6989586621681043300"><span class="hs-identifier hs-var">setHasInfo</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043286"><span class="annot"><span class="annottext">(DebugBlock, [UnwindPoint])
</span><a href="#local-6989586621681043286"><span class="hs-identifier hs-var">c0</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681043285"><span class="annot"><span class="annottext">[(DebugBlock, [UnwindPoint])]
</span><a href="#local-6989586621681043285"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DebugBlock)
-&gt; (DebugBlock, [UnwindPoint]) -&gt; (DebugBlock, [UnwindPoint])
forall (a :: * -&gt; * -&gt; *) b c d.
Arrow a =&gt;
a b c -&gt; a (b, d) (c, d)
</span><a href="../../base/src/Control.Arrow.html#first"><span class="hs-identifier hs-var">first</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; DebugBlock
</span><a href="#local-6989586621681043284"><span class="hs-identifier hs-var">setIt</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock, [UnwindPoint])
</span><a href="#local-6989586621681043286"><span class="hs-identifier hs-var">c0</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock, [UnwindPoint])
-&gt; [(DebugBlock, [UnwindPoint])] -&gt; [(DebugBlock, [UnwindPoint])]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(DebugBlock, [UnwindPoint])]
</span><a href="#local-6989586621681043285"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-254"></span><span>          </span><span class="hs-keyword">where</span><span>
</span><span id="line-255"></span><span>            </span><span id="local-6989586621681043284"><span class="annot"><span class="annottext">setIt :: DebugBlock -&gt; DebugBlock
</span><a href="#local-6989586621681043284"><span class="hs-identifier hs-var hs-var">setIt</span></a></span></span><span> </span><span id="local-6989586621681043283"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043283"><span class="hs-identifier hs-var">child</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-256"></span><span>              </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043283"><span class="hs-identifier hs-var">child</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dblHasInfoTbl :: Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var">dblHasInfoTbl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var hs-var">dblHasInfoTbl</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043283"><span class="hs-identifier hs-var">child</span></a></span><span>
</span><span id="line-257"></span><span>                                      </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var hs-var">dblHasInfoTbl</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043308"><span class="hs-identifier hs-var">blk</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#blockToFrame"><span class="hs-identifier hs-type">blockToFrame</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfFrameBlock"><span class="hs-identifier hs-type">DwarfFrameBlock</span></a></span><span>
</span><span id="line-260"></span><span id="blockToFrame"><span class="annot"><span class="annottext">blockToFrame :: DebugBlock -&gt; [UnwindPoint] -&gt; DwarfFrameBlock
</span><a href="GHC.CmmToAsm.Dwarf.html#blockToFrame"><span class="hs-identifier hs-var hs-var">blockToFrame</span></a></span></span><span> </span><span id="local-6989586621681043282"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043282"><span class="hs-identifier hs-var">blk</span></a></span></span><span> </span><span id="local-6989586621681043281"><span class="annot"><span class="annottext">[UnwindPoint]
</span><a href="#local-6989586621681043281"><span class="hs-identifier hs-var">uws</span></a></span></span><span>
</span><span id="line-261"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DwarfFrameBlock :: Bool -&gt; [UnwindPoint] -&gt; DwarfFrameBlock
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#DwarfFrameBlock"><span class="hs-identifier hs-type">DwarfFrameBlock</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dwFdeBlkHasInfo :: Bool
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwFdeBlkHasInfo"><span class="hs-identifier hs-var">dwFdeBlkHasInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var hs-var">dblHasInfoTbl</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681043282"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-262"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dwFdeUnwind :: [UnwindPoint]
</span><a href="GHC.CmmToAsm.Dwarf.Types.html#dwFdeUnwind"><span class="hs-identifier hs-var">dwFdeUnwind</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UnwindPoint]
</span><a href="#local-6989586621681043281"><span class="hs-identifier hs-var">uws</span></a></span><span>
</span><span id="line-263"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-264"></span><span>
</span><span id="line-265"></span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html#addDefaultUnwindings"><span class="hs-identifier hs-type">addDefaultUnwindings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindTable"><span class="hs-identifier hs-type">UnwindTable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-266"></span><span id="addDefaultUnwindings"><span class="annot"><span class="annottext">addDefaultUnwindings :: UnwindTable -&gt; [UnwindPoint] -&gt; [UnwindPoint]
</span><a href="GHC.CmmToAsm.Dwarf.html#addDefaultUnwindings"><span class="hs-identifier hs-var hs-var">addDefaultUnwindings</span></a></span></span><span> </span><span id="local-6989586621681043277"><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043277"><span class="hs-identifier hs-var">tbl</span></a></span></span><span> </span><span id="local-6989586621681043276"><span class="annot"><span class="annottext">[UnwindPoint]
</span><a href="#local-6989586621681043276"><span class="hs-identifier hs-var">pts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-267"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; UnwindTable -&gt; UnwindPoint
</span><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-var">UnwindPoint</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043274"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043273"><span class="hs-identifier hs-var">tbl'</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindTable -&gt; UnwindTable -&gt; UnwindTable
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043277"><span class="hs-identifier hs-var">tbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>      </span><span class="hs-comment">-- mappend is left-biased</span><span>
</span><span id="line-269"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span> </span><span id="local-6989586621681043274"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043274"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681043273"><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681043273"><span class="hs-identifier hs-var">tbl'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[UnwindPoint]
</span><a href="#local-6989586621681043276"><span class="hs-identifier hs-var">pts</span></a></span><span>
</span><span id="line-270"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-271"></span></pre></body></html>